<template>
	<sw-common-frame :loading="loading">
		<div class="base_info_wrapper">
			<el-form ref="form" label-position="top" slot="component">
				<el-row :gutter="20">
					<el-col v-for="(item, index) in baseInfoList" :key="index" :span="6">
						<el-form-item :label="item.label" :prop="item.code">
							<sw-image-uploader class="image" accept="ico,png,jpg,jpeg" v-model="item.value" />
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
		</div>
	</sw-common-frame>
</template>

<script>
import lodash from 'lodash';
import listMixins from '@/mixins/listMixins';
import { getBaseInfoList, updateBaseInfo } from '@/api/system/sysBaseInfo';
export default {
	mixins: [listMixins],
	data() {
		return {
			formData: {},
			pageName: '默认图片',
			queryData: { page: 1, limit: 999, scopeType: '2' },
			baseInfoList: []
		};
	},
	computed: {
		listFunction() {
			return eval(getBaseInfoList);
		},
		tableListData() {
			return this.tableData;
		}
	},
	watch: {
		tableListData(arr) {
			this.baseInfoList = lodash.cloneDeep(arr);
		}
	},
	methods: {}
};
</script>

<style lang="scss" scoped>
.base_info_wrapper::v-deep {
	display: flex;
	flex-direction: column;
	height: 100%;
	.el-form {
		flex: 1;
		overflow: hidden;
		overflow-y: auto;
		padding: 24px 24px 0;
	}
	.el-form-item__label {
		display: flex;
		align-items: center;
		font-weight: bold;
		line-height: 1;
	}
	.image {
		display: inline-block;
	}
}
</style>
